Skip to content

test(store): a missing domain reads back as not found - #1944

Merged
whoAbhishekSah merged 1 commit into
mainfrom
domain-get-not-found-test
Sep 23, 2026
Merged

whoAbhishekSah merged 1 commit into
mainfrom
domain-get-not-found-test

Conversation

@whoAbhishekSah

Copy link
Copy Markdown
Member

Test-only follow-up to #1940. The domain repository suite arrived in #1938 after the not-found mapping merged, so the case was left for when both were in.

What

The domain test now expects domain.ErrNotExist from Get for a soft-deleted id and for an unknown id, instead of any error.

Behaviour change

None. Tests only.

Covers the not-found mapping added in #1940 for both a soft-deleted id and an
unknown id. The domain suite did not exist when that fix landed.
@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
frontier Ready Ready Preview Sep 23, 2026 9:55am UTC

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: raystack/frontier/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: d5d211c8-0e35-4863-a75b-40a16f25b2da

📥 Commits

Reviewing files that changed from the base of the PR and between 639e284 and 828d3d1.

📒 Files selected for processing (1)
  • internal/store/postgres/domain_repository_test.go

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Summary

Summary by CodeRabbit

  • Tests
    • Expanded coverage for domain lookups to verify consistent not-found errors for both soft-deleted and nonexistent domains.

Walkthrough

The PostgreSQL domain repository test now checks that fetching a soft-deleted domain and a randomly selected non-existent domain returns domain.ErrNotExist.

Changes

Domain not-found assertions

Layer / File(s) Summary
Assert domain not-found errors
internal/store/postgres/domain_repository_test.go
The test asserts domain.ErrNotExist when fetching a soft-deleted domain and a randomly selected non-existent domain.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 828d3

The PR strengthens tests for deleted and unknown domain IDs without changing runtime behavior; no actionable merge risk remains.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@whoAbhishekSah
whoAbhishekSah enabled auto-merge (squash) September 23, 2026 09:55
@whoAbhishekSah
whoAbhishekSah merged commit c5c6903 into main Sep 23, 2026
8 checks passed
@whoAbhishekSah
whoAbhishekSah deleted the domain-get-not-found-test branch September 23, 2026 10:00
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 35845698501

Coverage remained the same at 51.564%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 41120
Covered Lines: 21203
Line Coverage: 51.56%
Coverage Strength: 16.74 hits per line

💛 - Coveralls

This branch was successfully deployed

1 active deployment
Preview — 828d3d13 Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants